﻿using System.ComponentModel.DataAnnotations.Schema;

namespace ZenSystemService.Api.Entities
{
   
    public class TraineeOrder
    {
        public int TraineeOrderId { get; set; }


        /// <summary>
        /// 机构ID
        /// </summary>
        public int InstitutionId { get; set; }

        /// <summary>
        /// 学员ID
        /// </summary>
        public int TraineeId { get; set; }


        /// <summary>
        /// 学员姓名
        /// </summary>
        [NotMapped]
        public string TraineeName { get; set; }

        /// <summary>
        /// 学员手机号
        /// </summary>
        [NotMapped]
        public string TraineeMobile { get; set; }

        /// <summary>
        /// 购买课程总价
        /// </summary>
        public decimal BuyCourseTotalPrice { get; set; }

        /// <summary>
        /// 购买时间
        /// </summary>
        public DateTime BuyDate { get; set; }

        /// <summary>
        /// 销售员
        /// </summary>
        public int? SalesUserId { get; set; }

        /// <summary>
        /// 销售姓名
        /// </summary>
        [NotMapped]
        public string SalesUserName { get; set; }

        public int? CreatedUserID { get; set; }

        public DateTime? CreatedDate { get; set; }


        /// <summary>
        /// 付款状态  0=未付 1=已付
        /// </summary>
        public int PaymentStatus { get; set; }


        [NotMapped]
        public string PaymentStatusTxt { get; set; }


        /// <summary>
        /// 支付操作用户ID
        /// </summary>
        public int PaymentOperUserId { get; set; }


        /// <summary>
        /// 付款时间
        /// </summary>
        public DateTime? PaymentTime { get; set; }

        public string? SaveImage { get; set; }


        public List<TraineeOrderDetail> TraineeOrderDetailList { get; set; }

    }

    public class TraineeOrderDetail
    {
        public int TraineeOrderDetailId { get; set; }

        public int TraineeOrderId { get; set; }

        /// <summary>
        /// 学员ID
        /// </summary>
        public int TraineeId { get; set; }

        /// <summary>
        /// 学员姓名
        /// </summary>
        [NotMapped]
        public string TraineeName { get; set; }


        /// <summary>
        /// 购买课程类型
        /// </summary>
        public int BuyCourseTypeId { get; set; }


        /// <summary>
        /// 课程类型名称
        /// </summary>
        [NotMapped]
        public string CourseTypeName { get; set; }


        public int? CoachId { get; set; }

        /// <summary>
        ///  教练名称
        /// </summary>
        [NotMapped]
        public string CoachName { get; set; }


        /// <summary>
        /// 购买课程数
        /// </summary>
        public int BuyCourseNum { get; set; }

        /// <summary>
        /// 购买课程价格
        /// </summary>
        public decimal BuyCoursePrice { get; set; }


        public List<TraineeOrderRecommendTermDetail> TraineeOrderRecommendTermDetailList { get; set; }
    }



    /// <summary>
    /// 学员订单推荐项目 详情
    /// </summary>
    public class TraineeOrderRecommendTermDetail
    { 
        public int TraineeOrderRecommendTermDetailId{ get; set; }


        public int TraineeOrderDetailId { get; set; }

        /// <summary>
        /// 推荐项目ID
        /// </summary>
        public int RecommendTermId { get; set; }

        /// <summary>
        /// 推荐项目名称
        /// </summary>
        [NotMapped]
        public string RecommendTermName { get; set; }


        public int Num { get; set; }
    }


    //学员剩余课程表
    public class TraineeCourseSurplus
    { 
        public int TraineeCourseSurplusId { get; set; }

        /// <summary>
        /// 课程类型Id
        /// </summary>
        public int CourseTypeId { get; set; }


        [NotMapped]
        public int CourseType { get; set; }


        /// <summary>
        /// 学员ID
        /// </summary>
        public int TraineeId { get; set; }



        /// <summary>
        /// 剩余课程数
        /// </summary>
        public int SurplusCourseNum { get; set; }


        public int? CoachId { get; set; }
    }
}
